<template>
  <view>
    <view class="cu-item  margin-sm" @tap.stop="redirectOrder">
  <!--    <view class="cu-avatar radius lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big81020.jpg);">-->
  <!--      <view class="cu-tag badge"></view>-->
  <!--    </view>-->
      <view class="content">
        <view class="flex">
          <view>
            <font class="sx"></font>
          </view>
          <view class="text-cut text-lg">{{order.productName}}</view>
          <view class="flex-sub text-right padding-right-xs"><image src="@/static/images/ewm.png" class="png" /></view>
  <!--        <view class="cu-tag round bg-orange sm">{{order.orderStatusName}}</view>-->
        </view>
        <view class="text-gray text-sm flex">
          <view class="text-cut margin-top margin-left text-df">{{order.poiName}}</view>
        </view>
      </view>
      <view class="action flex margin-top text-df">
        <view class="text-gray flex-sub margin-left text-c">金额:{{order.receiptAmount}}</view>
        <view class="text-green padding-right-xs">{{order.orderStatusName}}</view>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">

import {onReachBottom, onLoad} from "@dcloudio/uni-app";
import {ref, onMounted, reactive, toRaw, computed} from "vue";

import {useStore} from "@/common/store";
const store = useStore();

const userId = computed(() => store.userId)

interface Prop {
  order :{
    id: number
    shopNumber : number
    orderId : number
    orderType : number
    orderStatus : number
    accountId : number
    accountName : number
    poiId : number
    poiName : number
    num : number
    productId : number
    productName : number
    originalAmount : number
    receiptAmount : number
    paymentDiscount : number
    payAmount : number
    payTime : number
    orderSource : number
    statusFlag : number
    delFlag : number
    createUser : number
    createTime: number
    updateTime : number
    remark : number
  }
}

// 传递过来的参数
const props = defineProps<Prop>();

const redirectOrder = ()=> {
  uni.navigateTo({
    url: `/pages/order/OrderDetail?id=${props.order.id}`
  })
}

</script>

<style lang="scss" scoped>
.sx{
  height: 30rpx;
  width: 6rpx;
  background: #EAB769;
  display: inline-block;
  margin-right: 20rpx;
}
.png{
  width: 28rpx;
  height: 26rpx;
}
.text-c{
  color: #FF3048;
}
.cu-item{margin:0; padding:20rpx; border-bottom: 10px solid #f8f8f8;}
</style>
